//schedule.js
const app = getApp()
const util = require('../../utils/util.js')
const lbbService = require('../service/service.js')

Page({
  data: {
    hospitalId: '',
    backItemList: []
  },
  onLoad: function (options) {
    let that = this
    that.setData({
      hospitalId: options.hospitalId,
      scrollHeight: app.getScrollHeight(45)
    })
    
  },
  addPatrolBack: function(){
    wx.navigateTo({
      url: '/pages/addPatrolBack/addPatrolBack?hospitalId=' + this.data.hospitalId,
    })
  },
  onReady: function () {
    // Do something when page ready.
  },
  onShow: function () {
    let that = this
    lbbService.getFeedbackListHospital({ hospitalId: parseInt(that.data.hospitalId) },function(res){
      that.setData({
        backItemList: res
      })
    })
  },
  onHide: function () {
    // Do something when page hide.
  },
  onUnload: function () {
    // Do something when page close.
  },
  onPullDownRefresh: function () {
    // Do something when pull down
  },
  // Event handler.
})